#pragma once
#include "GLTools.h"

enum GLFormat
{
	LUMINANCE = GL_LUMINANCE,
	LUMINANCE_ALPHA = GL_LUMINANCE_ALPHA,
	RGB = GL_RGB,
	RGBA = GL_RGBA
};


class Texture2D
{
public:
	Texture2D(int width, int height, GLFormat format, GLint wrapModel, const void *data);
	~Texture2D();

	void UpdateTexture2D(int xoffset, int yoffset, int width, int height, int linesize, const void* data);

private:
	static GLuint CreateTexture2D(int width, int height, GLFormat format, GLint wrapModel, const void *data);
public:
	int width;
	int height;
	GLFormat format;

	GLuint texID;
};

